<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/forum_show">
    <table width="100%" style="border-collapse:collapse;" border="1" cellpadding="2">
      <tr>
        <td style="text-align:center;width:5%;background:#E7EBF7;">
          -
        </td>
        <td style="text-align:center;width:55%;background:#E7EBF7;">
          <b>Chủ đề</b>
        </td>
        <td style="text-align:center;width:15%;background:#E7EBF7;">
          <b>Thành viên</b>
        </td>
        <td style="text-align:center;width:15%;background:#E7EBF7;">
          <b>Gửi cuối</b>
        </td>
        <td style="text-align:center;width:5%;background:#E7EBF7;">
          <b>Xem</b>
        </td>
        <td style="text-align:center;width:5%;background:#E7EBF7;">
          <b>-</b>
        </td>
      </tr>
      <xsl:apply-templates select="Topic"></xsl:apply-templates>
      <tr>
        <td colspan="6" style="background:#E7EBF7;text-align:right">
          <a>
            <xsl:attribute name="href">/desktops/forum/rss.aspx?fid=<xsl:value-of select="FID"/></xsl:attribute>
            <img src="/images/rss2.gif" border="0" />
          </a>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template match="Topic">
    <tr>
      <td style="text-align:center;">
        <img>
          <xsl:attribute name="src"><xsl:value-of select="/forum_show/root_folder"></xsl:value-of>/images/topic_icon.gif</xsl:attribute>
        </img>
      </td>
      <td>
        <a>
          <xsl:attribute name="href">
            <xsl:value-of select="link"></xsl:value-of>
          </xsl:attribute>
          <xsl:if test="AlwayTop!=''">
            (<img src="/images/star.gif" border="0" />)&#160;
          </xsl:if>
          <xsl:value-of select="TopicName"></xsl:value-of>
        </a>
        <xsl:if test="url_admin!=''">
          <a>
            <xsl:attribute name="href">
              <xsl:value-of select="url_admin"></xsl:value-of>
            </xsl:attribute>
            <img border="0">
              <xsl:attribute name="src">
                <xsl:value-of select="/forum_show/root_folder"></xsl:value-of>/images/edit.gif
              </xsl:attribute>
            </img>
          </a>
        </xsl:if>
        <xsl:if test="ListPage!=''">
          <br/>
          <xsl:value-of select="ListPage"  disable-output-escaping="yes"></xsl:value-of>
        </xsl:if>
      </td>
      <td style="text-align:center;">
        <xsl:value-of select="Creator"></xsl:value-of>
        <br/>
        <xsl:value-of select="PostedDate"></xsl:value-of>
      </td>
      <td style="text-align:center;">
        <xsl:value-of select="ModifyUser"></xsl:value-of>
        <br/>
        <xsl:value-of select="ModifyDate"></xsl:value-of>
      </td>
      <td style="text-align:center;">
        <xsl:value-of select="TotalView"></xsl:value-of>
      </td>
      <td style="text-align:center;">
        <xsl:value-of select="TotalReply"></xsl:value-of>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

